#include <bits/stdc++.h>

using namespace std;
#define endl '\n'

int main(){
    ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    string s;
    cin >> s;
    int num = 0, m = 1;
    char flag = s[s.length() - 1];
    for(int i = 0; i < s.length() - 1; i++){
        if(s[i] >= '0' && s[i] <= '9'){
            num  = (num + (s[i] - '0') * (m++)) % 11;
        }
    }
    if(num < 10) s[s.length() - 1] = (char)(num + '0');
    else s[s.length() - 1] = 'X';

    if((char)(num + '0') == flag || (flag == 'X' && num == 10)) cout << "Right" << endl;
    else cout << s << endl;

    return 0;
}
